<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
			body{
				perspective: 800px;
				/*视点位置*/
				/*perspective-origin: 60% 50%;*/
			}
			#box{
				width: 500px;
				height: 400px;
				margin: 80px auto;
				/*border: 1px solid white;*/
				/*background:white;*/
				position: relative;
				transform-style: preserve-3d;
				animation: hd 30s infinite linear;
			}
			@-webkit-keyframes hd{
				from{transform: rotateY(0deg) rotateX(0deg);}
				to{transform: rotateY(360deg) rotateX(360deg);}
			}
			#box div{
				width: 200px;
				height: 200px;
				position: absolute;
				left: 150px;
				top: 100px;
				transform-style: preserve-3d;
			}
			#box div:nth-of-type(1){
				background:rgba(255,255,0,0.5);
				transform: translateZ(100px);
			}
			#box div:nth-of-type(2){
				background:rgba(255,0,255,0.5);
				transform: translateZ(-100px);
			}
			#box div:nth-of-type(3){
				background: rgba(0,0,255,0.5);
				transform: translateZ(100px) rotateY(90deg);
				transform-origin: left;
			}
			#box div:nth-of-type(4){
				background: rgba(0,255,0,0.5);
				transform: translateZ(-100px) rotateY(90deg);
				transform-origin:right;
			}
			#box div:nth-of-type(5){
				background: rgba(255,0,0,0.5);
				transform: translateX(0px) translateY(-100px) rotateX(90deg);
				transform-origin:left;
			}
			#box div:nth-of-type(6){
				background: rgba(255,0,0,0.5);
				transform: translateX(0px) translateY(100px) rotateX(90deg);
				transform-origin:right;
			}
		</style>
	</head>
	<body>
		<div id="box">
			<div>正面</div>
			<div>背面</div>
			<div>左面</div>
			<div>右面</div>
			<div>上面</div>
			<div>下面</div>
		</div>
	</body>
</html>
